
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@page import="com.tss.util.*"%>
<%@page import="com.jedi.*"%>
<%@page import="com.store.*"%>
<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@include file="../global_var.jsp"%>
<%@include file="../check_login.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
User just_user = (User)session.getAttribute("LoginUser");


User user = (User)session.getAttribute("LoginUser");
ArticleMgr articleMgr = new ArticleMgr();
String strErr = "";
String article_id = ParamUtils.getParameter(request,"article_id","");
Article article = articleMgr.get(article_id);
if (article == null || !article.getAuthorId().trim().equals(user.getId())) {
	out.println(strNoPowerInfo); 
	return;
}
if (article == null || article.getId().trim().equals("")) 
	strErr = "该文章不存在!";
%>
<html>
<head>
   <base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="style/main.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/common.js"></script>
<script language="javascript">
function clk_goback() {
	history.back();
}
</script>
</head>
<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td style="padding-left:25px;">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="31" valign="top" background="images/title_bk_01.gif" style="padding-left:10px;padding-top:6px;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%" style="color:#FFFFFF;font-size:13px;">
                  <b>知识库</b> -&gt; 
                  <b>文章浏览</b>
                </td>
                <td width="50%" align="right" style="padding-right:10px;">&nbsp;
                  <!--span onclick="clk_goback();" style="cursor:hand;color:#FFFFFF;font-size:12px;text-de--ation: underline;">返回文章列表</span-->
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td height="100" align="center" valign="top" style="padding-top:20px;padding-bottom:10px;">
            <table width="80%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
              <tr> 
                <td height="30" align="center" bgcolor="#EDEDF0" colspan="2">
                  文章详细信息
                </td>
              </tr>
              <%if (!strErr.trim().equals("")) {%>
              <tr> 
                <td width="30%" height="28" align="right" bgcolor="#858585"><font color="#FFFFFF">错误提示：</font></td>
                <td bgcolor="#EDEDF0"><font color=red><%=strErr%></font>&nbsp;</td>
              </tr>
              <%}%>
              <%
              if (article != null && !article.getId().equals("")) {
              	String content = article.getArticleContent();
              	content = content.replaceAll("\n","<br>");
              %>
              <tr> 
                <td width="30%" height="24" align="right" bgcolor="#858585"><font color="#FFFFFF">文章标题：</font></td>
                <td bgcolor="#D7D7DB"><%=article.getArticleTitle()%></td>
              </tr>
              <tr> 
                <td height="24" align="right" bgcolor="#858585"><font color="#FFFFFF">文章作者：</font></td>
                <td bgcolor="#D7D7DB"><%=article.getAuthorName()%></td>
              </tr>
              <tr> 
                <td height="24" align="right" bgcolor="#858585"><font color="#FFFFFF">文章内容：</font></td>
                <td bgcolor="#D7D7DB"><%=content%></td>
              </tr>
              <tr> 
                <td height="24" align="right" bgcolor="#858585"><font color="#FFFFFF">所属分类：</font></td>
                <td bgcolor="#D7D7DB"><%=article.getCategory().getCategoryName()%></td>
              </tr>
              <tr> 
                <td height="24" align="right" bgcolor="#858585"><font color="#FFFFFF">发布时间：</font></td>
                <td bgcolor="#D7D7DB"><%=article.getIssueTime()%></td>
              </tr>
              <%if (!article.getDocInfo().trim().equals("")){%>
              <tr> 
                <td height="24" align="right" bgcolor="#858585"><font color="#FFFFFF">附件：</font></td>
                <td bgcolor="#D7D7DB">
                  <a href="upload/knowledge/article/<%=article.getDocInfo()%>" target="_blank"><%=article.getDocInfo()%></a>
                </td>
              </tr>
              <%}%>
              <tr> 
                <td height="24" align="right" bgcolor="#858585"><font color="#FFFFFF">人气指数：</font></td>
                <td bgcolor="#D7D7DB"><%=article.getHit()%></td>
              </tr>
              <tr> 
                <td height="24" align="right" bgcolor="#EDEDF0">&nbsp;</td>
                <td bgcolor="#EDEDF0">
                  <input type="button" onclick="clk_goback();" name="btn" value="返　回" class="inputButton"> 
                </td>
              </tr>
              <%}%>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>